const express=require("express")
const router=express.Router()
const bokeServ=require("../../services/xqssservice")
const {
    asyncHandler
}=require("../getSendResult")

router.get("/",asyncHandler(async(req,res,next)=>{
    const page=req.query.page||1;
    const limit=req.query.limit||2;
    return await bokeServ.getfindall(page,limit);
}))

router.get("/getdz",asyncHandler(async(req,res,next)=>{
    const page=req.query.page|1;
    const limit=req.query.limit||1;
    const id=req.query.id
    return await bokeServ.getIdfind(page,limit,id);
}))
router.get("/updatebk",asyncHandler(async(req,res,next)=>{
    const id=req.query.id
    const obj={
        dz:req.query.dz
    }
    return await bokeServ.updateBoke(id,obj)
}))

module.exports=router